{smcl}
{txt}{sf}{ul off}{.-}
      name:  {res}<unnamed>
       {txt}log:  {res}C:\work\new\UCL\research\ph\phfd_psrm.smcl
  {txt}log type:  {res}smcl
 {txt}opened on:  {res}15 Nov 2018, 20:25:00
{txt}
{com}. use "ph_final", clear
{txt}
{com}. sort country year
{txt}
{com}. 
. 
. **Figure 1: Aggregate and District Level Kayser-Lindstadt Probabilities 
. twoway (scatter lp_n lpr, msize(small) mcolor(gs3)), graphregion(color(white)) plotregion(lstyle(foreground)) ylabel(0(.1)1, angle(0)) xlabel(0(.1)1) ytitle(Aggregate Level KL) xtitle(District Level KL) text(.9 .7 "corr(AL, DL) = 0.28")
{res}{txt}
{com}. graph export "figure_1.eps", as(eps) preview(off) replace
{txt}(file figure_1.eps written in EPS format)

{com}. 
. gen smpl_kl=1 if lpr>0 & !missing(lpr)
{txt}(3752 missing values generated)

{com}. replace smpl_kl=0 if lpr==0 | missing(lpr)
{txt}(3752 real changes made)

{com}. bys country: egen mn_smpl_kl=mean(smpl_kl)
{txt}
{com}. replace lpr=0 if missing(lpr) & mn_smpl_kl>0
{txt}(659 real changes made)

{com}. replace lpr2=0 if missing(lpr2) & mn_smpl_kl>0
{txt}(658 real changes made)

{com}. gen nomisslpn=1 if !missing(lp_n)
{txt}(3367 missing values generated)

{com}. replace nomisslpn=0 if missing(lp_n)
{txt}(3367 real changes made)

{com}. bys country: egen mn_lpn=mean(nomisslpn)
{txt}
{com}. replace lp_n=0 if missing(lp_n) 
{txt}(3367 real changes made)

{com}. gen lp_nsq=lp_n^2
{txt}
{com}. gen lp2_nsq=lp2_n^2
{txt}(3356 missing values generated)

{com}. replace lp_nsq=0 if missing(lp_nsq) 
{txt}(0 real changes made)

{com}. replace lp2_n=0 if missing(lp2_n) 
{txt}(3356 real changes made)

{com}. replace lp2_nsq=0 if missing(lp2_nsq)
{txt}(3356 real changes made)

{com}. label var lp_nsq "LL (a) squared"
{txt}
{com}. label var lp2_nsq "LL (b) squared"
{txt}
{com}. 
. 
. **Table 1 - Central Gov Balances FE***
. *________________
. sort cid year
{txt}
{com}. *1 - polarization
. quietly: xtreg cg_bal_gdp l.cg_bal_gdp ldef_polar polar gdp_grwth elec ln_infl unemp_ilo r_intrt, fe robust cluster(cid)
{txt}
{com}. gen rwd=e(sample)
{txt}
{com}. replace bbr=0 if rwd==1 & missing(bbr)
{txt}(397 real changes made)

{com}. replace dr=0 if rwd==1 & missing(dr)
{txt}(397 real changes made)

{com}. 
. xtreg cg_bal_gdp l.cg_bal_gdp ldef_polar polar gdp_grwth elec ln_infl unemp_ilo r_intrt bbr dr, fe robust cluster(cid)

{txt}Fixed-effects (within) regression               Number of obs      = {res}     1306
{txt}Group variable: {res}cid                             {txt}Number of groups   = {res}       83

{txt}R-sq:  within  = {res}0.4644                         {txt}Obs per group: min = {res}        2
{txt}       between = {res}0.8951                                        {txt}avg = {res}     15.7
{txt}       overall = {res}0.6346                                        {txt}max = {res}       32

                                                {txt}F({res}10{txt},{res}82{txt})           = {res}    20.89
{txt}corr(u_i, Xb)  = {res}0.4383                         {txt}Prob > F           =    {res}0.0000

{txt}{ralign 78:(Std. Err. adjusted for {res:83} clusters in cid)}
{hline 13}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 14}{c |}{col 26}    Robust
{col 1}  cg_bal_gdp{col 14}{c |}      Coef.{col 26}   Std. Err.{col 38}      t{col 46}   P>|t|{col 54}     [95% Con{col 67}f. Interval]
{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 2}cg_bal_gdp {c |}
{space 9}L1. {c |}{col 14}{res}{space 2} .4110708{col 26}{space 2} .0633782{col 37}{space 1}    6.49{col 46}{space 3}0.000{col 54}{space 4} .2849914{col 67}{space 3} .5371503
{txt}{space 12} {c |}
{space 2}ldef_polar {c |}{col 14}{res}{space 2}  .064238{col 26}{space 2} .0549054{col 37}{space 1}    1.17{col 46}{space 3}0.245{col 54}{space 4}-.0449864{col 67}{space 3} .1734624
{txt}{space 7}polar {c |}{col 14}{res}{space 2}-.1215892{col 26}{space 2} .1832669{col 37}{space 1}   -0.66{col 46}{space 3}0.509{col 54}{space 4}-.4861653{col 67}{space 3}  .242987
{txt}{space 3}gdp_grwth {c |}{col 14}{res}{space 2} .2455723{col 26}{space 2} .0312736{col 37}{space 1}    7.85{col 46}{space 3}0.000{col 54}{space 4} .1833591{col 67}{space 3} .3077855
{txt}{space 8}elec {c |}{col 14}{res}{space 2}-.3651158{col 26}{space 2} .1120177{col 37}{space 1}   -3.26{col 46}{space 3}0.002{col 54}{space 4}-.5879547{col 67}{space 3}-.1422768
{txt}{space 5}ln_infl {c |}{col 14}{res}{space 2} .1756544{col 26}{space 2} .1024377{col 37}{space 1}    1.71{col 46}{space 3}0.090{col 54}{space 4}-.0281269{col 67}{space 3} .3794356
{txt}{space 3}unemp_ilo {c |}{col 14}{res}{space 2}-.0819622{col 26}{space 2} .0420995{col 37}{space 1}   -1.95{col 46}{space 3}0.055{col 54}{space 4}-.1657115{col 67}{space 3}  .001787
{txt}{space 5}r_intrt {c |}{col 14}{res}{space 2}-.0135753{col 26}{space 2} .0144142{col 37}{space 1}   -0.94{col 46}{space 3}0.349{col 54}{space 4}-.0422498{col 67}{space 3} .0150992
{txt}{space 9}bbr {c |}{col 14}{res}{space 2} .9051964{col 26}{space 2}  .402672{col 37}{space 1}    2.25{col 46}{space 3}0.027{col 54}{space 4} .1041534{col 67}{space 3} 1.706239
{txt}{space 10}dr {c |}{col 14}{res}{space 2} .1074765{col 26}{space 2} .3993601{col 37}{space 1}    0.27{col 46}{space 3}0.789{col 54}{space 4}-.6869779{col 67}{space 3} .9019309
{txt}{space 7}_cons {c |}{col 14}{res}{space 2} -1.46425{col 26}{space 2} .4526445{col 37}{space 1}   -3.23{col 46}{space 3}0.002{col 54}{space 4}-2.364704{col 67}{space 3}-.5637954
{txt}{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
     sigma_u {c |} {res} 3.1534595
     {txt}sigma_e {c |} {res}  2.285248
         {txt}rho {c |} {res} .65566865{txt}   (fraction of variance due to u_i)
{hline 13}{c BT}{hline 64}

{com}. estimates store m1
{txt}
{com}. 
. *2- parties in government
. quietly: xtreg cg_bal_gdp l.cg_bal_gdp ldef_pig pig gdp_grwth elec ln_infl unemp_ilo r_intrt, fe robust cluster(cid)
{txt}
{com}. 
. *w/fiscal rules
. xtreg cg_bal_gdp l.cg_bal_gdp ldef_pig pig gdp_grwth elec ln_infl unemp_ilo r_intrt dr bbr, fe robust cluster(cid)

{txt}Fixed-effects (within) regression               Number of obs      = {res}     1300
{txt}Group variable: {res}cid                             {txt}Number of groups   = {res}       83

{txt}R-sq:  within  = {res}0.4853                         {txt}Obs per group: min = {res}        2
{txt}       between = {res}0.9489                                        {txt}avg = {res}     15.7
{txt}       overall = {res}0.7016                                        {txt}max = {res}       32

                                                {txt}F({res}10{txt},{res}82{txt})           = {res}    35.06
{txt}corr(u_i, Xb)  = {res}0.5085                         {txt}Prob > F           =    {res}0.0000

{txt}{ralign 78:(Std. Err. adjusted for {res:83} clusters in cid)}
{hline 13}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 14}{c |}{col 26}    Robust
{col 1}  cg_bal_gdp{col 14}{c |}      Coef.{col 26}   Std. Err.{col 38}      t{col 46}   P>|t|{col 54}     [95% Con{col 67}f. Interval]
{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 2}cg_bal_gdp {c |}
{space 9}L1. {c |}{col 14}{res}{space 2} .5229195{col 26}{space 2} .0347517{col 37}{space 1}   15.05{col 46}{space 3}0.000{col 54}{space 4} .4537872{col 67}{space 3} .5920517
{txt}{space 12} {c |}
{space 4}ldef_pig {c |}{col 14}{res}{space 2} .0869497{col 26}{space 2} .0272786{col 37}{space 1}    3.19{col 46}{space 3}0.002{col 54}{space 4} .0326839{col 67}{space 3} .1412156
{txt}{space 9}pig {c |}{col 14}{res}{space 2}-.2519526{col 26}{space 2} .0987955{col 37}{space 1}   -2.55{col 46}{space 3}0.013{col 54}{space 4}-.4484884{col 67}{space 3}-.0554168
{txt}{space 3}gdp_grwth {c |}{col 14}{res}{space 2} .2401784{col 26}{space 2}  .027117{col 37}{space 1}    8.86{col 46}{space 3}0.000{col 54}{space 4}  .186234{col 67}{space 3} .2941228
{txt}{space 8}elec {c |}{col 14}{res}{space 2}-.3907271{col 26}{space 2} .1163443{col 37}{space 1}   -3.36{col 46}{space 3}0.001{col 54}{space 4} -.622173{col 67}{space 3}-.1592811
{txt}{space 5}ln_infl {c |}{col 14}{res}{space 2} .1685674{col 26}{space 2} .1016791{col 37}{space 1}    1.66{col 46}{space 3}0.101{col 54}{space 4}-.0337047{col 67}{space 3} .3708394
{txt}{space 3}unemp_ilo {c |}{col 14}{res}{space 2}-.0695389{col 26}{space 2} .0392328{col 37}{space 1}   -1.77{col 46}{space 3}0.080{col 54}{space 4}-.1475854{col 67}{space 3} .0085076
{txt}{space 5}r_intrt {c |}{col 14}{res}{space 2}-.0125403{col 26}{space 2} .0146658{col 37}{space 1}   -0.86{col 46}{space 3}0.395{col 54}{space 4}-.0417152{col 67}{space 3} .0166346
{txt}{space 10}dr {c |}{col 14}{res}{space 2} .2356876{col 26}{space 2} .3161237{col 37}{space 1}    0.75{col 46}{space 3}0.458{col 54}{space 4}-.3931832{col 67}{space 3} .8645584
{txt}{space 9}bbr {c |}{col 14}{res}{space 2} .7124325{col 26}{space 2} .2955371{col 37}{space 1}    2.41{col 46}{space 3}0.018{col 54}{space 4}  .124515{col 67}{space 3}  1.30035
{txt}{space 7}_cons {c |}{col 14}{res}{space 2}-1.359384{col 26}{space 2} .4660681{col 37}{space 1}   -2.92{col 46}{space 3}0.005{col 54}{space 4}-2.286542{col 67}{space 3}-.4322261
{txt}{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
     sigma_u {c |} {res} 2.4063247
     {txt}sigma_e {c |} {res} 2.2425918
         {txt}rho {c |} {res} .53517596{txt}   (fraction of variance due to u_i)
{hline 13}{c BT}{hline 64}

{com}. estimates store m2
{txt}
{com}. 
. *3 - pig and exec ideology diff
. quietly: xtreg cg_bal_gdp l.cg_bal_gdp ldef_pig pig gdp_grwth elec ln_infl unemp_ilo r_intrt dist_ex_opp, fe robust cluster(cid)
{txt}
{com}. * right/left
. quietly: xtreg cg_bal_gdp l.cg_bal_gdp ldef_pig pig gdp_grwth elec ln_infl unemp_ilo r_intrt dist_ex_opp right left, fe robust cluster(cid)
{txt}
{com}. *w/rule
. xtreg cg_bal_gdp l.cg_bal_gdp ldef_pig pig gdp_grwth elec ln_infl unemp_ilo r_intrt dist_ex_opp right left bbr dr, fe robust cluster(cid)

{txt}Fixed-effects (within) regression               Number of obs      = {res}     1197
{txt}Group variable: {res}cid                             {txt}Number of groups   = {res}       79

{txt}R-sq:  within  = {res}0.4798                         {txt}Obs per group: min = {res}        1
{txt}       between = {res}0.9383                                        {txt}avg = {res}     15.2
{txt}       overall = {res}0.7034                                        {txt}max = {res}       32

                                                {txt}F({res}13{txt},{res}78{txt})           = {res}    17.93
{txt}corr(u_i, Xb)  = {res}0.5058                         {txt}Prob > F           =    {res}0.0000

{txt}{ralign 78:(Std. Err. adjusted for {res:79} clusters in cid)}
{hline 13}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 14}{c |}{col 26}    Robust
{col 1}  cg_bal_gdp{col 14}{c |}      Coef.{col 26}   Std. Err.{col 38}      t{col 46}   P>|t|{col 54}     [95% Con{col 67}f. Interval]
{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 2}cg_bal_gdp {c |}
{space 9}L1. {c |}{col 14}{res}{space 2}  .506934{col 26}{space 2}  .046892{col 37}{space 1}   10.81{col 46}{space 3}0.000{col 54}{space 4} .4135792{col 67}{space 3} .6002888
{txt}{space 12} {c |}
{space 4}ldef_pig {c |}{col 14}{res}{space 2}  .085666{col 26}{space 2} .0245256{col 37}{space 1}    3.49{col 46}{space 3}0.001{col 54}{space 4} .0368392{col 67}{space 3} .1344928
{txt}{space 9}pig {c |}{col 14}{res}{space 2}-.2262683{col 26}{space 2} .0947552{col 37}{space 1}   -2.39{col 46}{space 3}0.019{col 54}{space 4}-.4149114{col 67}{space 3}-.0376252
{txt}{space 3}gdp_grwth {c |}{col 14}{res}{space 2} .2389207{col 26}{space 2}   .02669{col 37}{space 1}    8.95{col 46}{space 3}0.000{col 54}{space 4} .1857851{col 67}{space 3} .2920563
{txt}{space 8}elec {c |}{col 14}{res}{space 2}-.3986771{col 26}{space 2} .1227564{col 37}{space 1}   -3.25{col 46}{space 3}0.002{col 54}{space 4}-.6430664{col 67}{space 3}-.1542879
{txt}{space 5}ln_infl {c |}{col 14}{res}{space 2} .1225998{col 26}{space 2} .1011595{col 37}{space 1}    1.21{col 46}{space 3}0.229{col 54}{space 4}-.0787934{col 67}{space 3} .3239929
{txt}{space 3}unemp_ilo {c |}{col 14}{res}{space 2} -.101022{col 26}{space 2} .0422694{col 37}{space 1}   -2.39{col 46}{space 3}0.019{col 54}{space 4}-.1851738{col 67}{space 3}-.0168701
{txt}{space 5}r_intrt {c |}{col 14}{res}{space 2}-.0123154{col 26}{space 2} .0151478{col 37}{space 1}   -0.81{col 46}{space 3}0.419{col 54}{space 4}-.0424723{col 67}{space 3} .0178416
{txt}{space 1}dist_ex_opp {c |}{col 14}{res}{space 2} .2202953{col 26}{space 2} .1030932{col 37}{space 1}    2.14{col 46}{space 3}0.036{col 54}{space 4} .0150525{col 67}{space 3} .4255381
{txt}{space 7}right {c |}{col 14}{res}{space 2} .7346462{col 26}{space 2} .2855415{col 37}{space 1}    2.57{col 46}{space 3}0.012{col 54}{space 4} .1661767{col 67}{space 3} 1.303116
{txt}{space 8}left {c |}{col 14}{res}{space 2}-.0089295{col 26}{space 2} .4808535{col 37}{space 1}   -0.02{col 46}{space 3}0.985{col 54}{space 4}-.9662353{col 67}{space 3} .9483763
{txt}{space 9}bbr {c |}{col 14}{res}{space 2} .7608708{col 26}{space 2} .3233907{col 37}{space 1}    2.35{col 46}{space 3}0.021{col 54}{space 4} .1170493{col 67}{space 3} 1.404692
{txt}{space 10}dr {c |}{col 14}{res}{space 2} .1495648{col 26}{space 2} .3176353{col 37}{space 1}    0.47{col 46}{space 3}0.639{col 54}{space 4}-.4827985{col 67}{space 3} .7819281
{txt}{space 7}_cons {c |}{col 14}{res}{space 2}-1.312519{col 26}{space 2} .5082745{col 37}{space 1}   -2.58{col 46}{space 3}0.012{col 54}{space 4}-2.324416{col 67}{space 3}-.3006227
{txt}{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
     sigma_u {c |} {res} 2.6762643
     {txt}sigma_e {c |} {res} 2.1990754
         {txt}rho {c |} {res} .59694931{txt}   (fraction of variance due to u_i)
{hline 13}{c BT}{hline 64}

{com}. estimates store m3
{txt}
{com}. 
. estout m1 m2 m3 using "table1.tex", cells(b(star fmt(%9.2f)) se(par)) stats(r2_a N, fmt(%9.3f %9.0g) labels(R-squared)) legend label collabels(none) varlabels(_cons Constant) replace
{res}{txt}(output written to {browse  `"table1.tex"'})

{com}. 
. 
. **Table 2 - Central Gov Balances and Loss Likelihoods***
. *_______________________________
. 
. *1 - KL data
. 
. *linear
. sort cid year
{txt}
{com}. xtreg cg_bal_gdp l.cg_bal_gdp ldef_pig pig gdp_grwth lpr r_intrt ln_infl unemp_ilo dist_ex_opp right left bbr dr if mn_smpl_kl>0, fe robust cluster(cid)

{txt}Fixed-effects (within) regression               Number of obs      = {res}      425
{txt}Group variable: {res}cid                             {txt}Number of groups   = {res}       21

{txt}R-sq:  within  = {res}0.6893                         {txt}Obs per group: min = {res}        2
{txt}       between = {res}0.9332                                        {txt}avg = {res}     20.2
{txt}       overall = {res}0.8220                                        {txt}max = {res}       32

                                                {txt}F({res}13{txt},{res}20{txt})           = {res}   335.43
{txt}corr(u_i, Xb)  = {res}0.4664                         {txt}Prob > F           =    {res}0.0000

{txt}{ralign 78:(Std. Err. adjusted for {res:21} clusters in cid)}
{hline 13}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 14}{c |}{col 26}    Robust
{col 1}  cg_bal_gdp{col 14}{c |}      Coef.{col 26}   Std. Err.{col 38}      t{col 46}   P>|t|{col 54}     [95% Con{col 67}f. Interval]
{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 2}cg_bal_gdp {c |}
{space 9}L1. {c |}{col 14}{res}{space 2} .7785372{col 26}{space 2} .0335889{col 37}{space 1}   23.18{col 46}{space 3}0.000{col 54}{space 4} .7084719{col 67}{space 3} .8486024
{txt}{space 12} {c |}
{space 4}ldef_pig {c |}{col 14}{res}{space 2} .0200624{col 26}{space 2} .0235195{col 37}{space 1}    0.85{col 46}{space 3}0.404{col 54}{space 4}-.0289983{col 67}{space 3} .0691232
{txt}{space 9}pig {c |}{col 14}{res}{space 2}-.0324926{col 26}{space 2}  .126997{col 37}{space 1}   -0.26{col 46}{space 3}0.801{col 54}{space 4}-.2974037{col 67}{space 3} .2324186
{txt}{space 3}gdp_grwth {c |}{col 14}{res}{space 2} .3631449{col 26}{space 2} .0779727{col 37}{space 1}    4.66{col 46}{space 3}0.000{col 54}{space 4} .2004966{col 67}{space 3} .5257932
{txt}{space 9}lpr {c |}{col 14}{res}{space 2}-.6372413{col 26}{space 2} .7404145{col 37}{space 1}   -0.86{col 46}{space 3}0.400{col 54}{space 4}-2.181719{col 67}{space 3} .9072363
{txt}{space 5}r_intrt {c |}{col 14}{res}{space 2}-.0810416{col 26}{space 2} .1058405{col 37}{space 1}   -0.77{col 46}{space 3}0.453{col 54}{space 4} -.301821{col 67}{space 3} .1397377
{txt}{space 5}ln_infl {c |}{col 14}{res}{space 2}-.1068247{col 26}{space 2} .1442824{col 37}{space 1}   -0.74{col 46}{space 3}0.468{col 54}{space 4}-.4077925{col 67}{space 3} .1941431
{txt}{space 3}unemp_ilo {c |}{col 14}{res}{space 2}-.0389429{col 26}{space 2} .0662285{col 37}{space 1}   -0.59{col 46}{space 3}0.563{col 54}{space 4}-.1770931{col 67}{space 3} .0992073
{txt}{space 1}dist_ex_opp {c |}{col 14}{res}{space 2} .0234875{col 26}{space 2} .1207235{col 37}{space 1}    0.19{col 46}{space 3}0.848{col 54}{space 4}-.2283373{col 67}{space 3} .2753123
{txt}{space 7}right {c |}{col 14}{res}{space 2} .3801053{col 26}{space 2} .3376107{col 37}{space 1}    1.13{col 46}{space 3}0.274{col 54}{space 4}-.3241384{col 67}{space 3} 1.084349
{txt}{space 8}left {c |}{col 14}{res}{space 2} .3426315{col 26}{space 2} .5153561{col 37}{space 1}    0.66{col 46}{space 3}0.514{col 54}{space 4}-.7323826{col 67}{space 3} 1.417646
{txt}{space 9}bbr {c |}{col 14}{res}{space 2} .6512839{col 26}{space 2} .4507594{col 37}{space 1}    1.44{col 46}{space 3}0.164{col 54}{space 4}-.2889838{col 67}{space 3} 1.591552
{txt}{space 10}dr {c |}{col 14}{res}{space 2} -.364989{col 26}{space 2} .5117307{col 37}{space 1}   -0.71{col 46}{space 3}0.484{col 54}{space 4} -1.43244{col 67}{space 3} .7024624
{txt}{space 7}_cons {c |}{col 14}{res}{space 2}-1.107445{col 26}{space 2} .8219854{col 37}{space 1}   -1.35{col 46}{space 3}0.193{col 54}{space 4}-2.822076{col 67}{space 3} .6071867
{txt}{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
     sigma_u {c |} {res}  .9416898
     {txt}sigma_e {c |} {res} 1.8598774
         {txt}rho {c |} {res} .20404862{txt}   (fraction of variance due to u_i)
{hline 13}{c BT}{hline 64}

{com}. estimates store l1
{txt}
{com}. 
. *quadratic
. xtreg cg_bal_gdp l.cg_bal_gdp ldef_pig pig gdp_grwth lpr lpr2 r_intrt ln_infl unemp_ilo dist_ex_opp right left bbr dr if mn_smpl_kl>0, fe robust cluster(cid)

{txt}Fixed-effects (within) regression               Number of obs      = {res}      425
{txt}Group variable: {res}cid                             {txt}Number of groups   = {res}       21

{txt}R-sq:  within  = {res}0.6894                         {txt}Obs per group: min = {res}        2
{txt}       between = {res}0.9329                                        {txt}avg = {res}     20.2
{txt}       overall = {res}0.8220                                        {txt}max = {res}       32

                                                {txt}F({res}14{txt},{res}20{txt})           = {res}   311.94
{txt}corr(u_i, Xb)  = {res}0.4658                         {txt}Prob > F           =    {res}0.0000

{txt}{ralign 78:(Std. Err. adjusted for {res:21} clusters in cid)}
{hline 13}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 14}{c |}{col 26}    Robust
{col 1}  cg_bal_gdp{col 14}{c |}      Coef.{col 26}   Std. Err.{col 38}      t{col 46}   P>|t|{col 54}     [95% Con{col 67}f. Interval]
{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 2}cg_bal_gdp {c |}
{space 9}L1. {c |}{col 14}{res}{space 2} .7781616{col 26}{space 2} .0335841{col 37}{space 1}   23.17{col 46}{space 3}0.000{col 54}{space 4} .7081064{col 67}{space 3} .8482168
{txt}{space 12} {c |}
{space 4}ldef_pig {c |}{col 14}{res}{space 2} .0200224{col 26}{space 2} .0234709{col 37}{space 1}    0.85{col 46}{space 3}0.404{col 54}{space 4} -.028937{col 67}{space 3} .0689818
{txt}{space 9}pig {c |}{col 14}{res}{space 2}-.0331358{col 26}{space 2} .1264338{col 37}{space 1}   -0.26{col 46}{space 3}0.796{col 54}{space 4}-.2968721{col 67}{space 3} .2306005
{txt}{space 3}gdp_grwth {c |}{col 14}{res}{space 2} .3635656{col 26}{space 2} .0782419{col 37}{space 1}    4.65{col 46}{space 3}0.000{col 54}{space 4} .2003558{col 67}{space 3} .5267754
{txt}{space 9}lpr {c |}{col 14}{res}{space 2}-1.303952{col 26}{space 2} .8174387{col 37}{space 1}   -1.60{col 46}{space 3}0.126{col 54}{space 4}  -3.0091{col 67}{space 3} .4011949
{txt}{space 8}lpr2 {c |}{col 14}{res}{space 2} 1.277452{col 26}{space 2} 2.270604{col 37}{space 1}    0.56{col 46}{space 3}0.580{col 54}{space 4}-3.458946{col 67}{space 3} 6.013849
{txt}{space 5}r_intrt {c |}{col 14}{res}{space 2}-.0807144{col 26}{space 2} .1060297{col 37}{space 1}   -0.76{col 46}{space 3}0.455{col 54}{space 4}-.3018885{col 67}{space 3} .1404597
{txt}{space 5}ln_infl {c |}{col 14}{res}{space 2}-.1073779{col 26}{space 2} .1445771{col 37}{space 1}   -0.74{col 46}{space 3}0.466{col 54}{space 4}-.4089603{col 67}{space 3} .1942046
{txt}{space 3}unemp_ilo {c |}{col 14}{res}{space 2}-.0384234{col 26}{space 2} .0659665{col 37}{space 1}   -0.58{col 46}{space 3}0.567{col 54}{space 4}-.1760272{col 67}{space 3} .0991803
{txt}{space 1}dist_ex_opp {c |}{col 14}{res}{space 2} .0256687{col 26}{space 2} .1236568{col 37}{space 1}    0.21{col 46}{space 3}0.838{col 54}{space 4}-.2322749{col 67}{space 3} .2836123
{txt}{space 7}right {c |}{col 14}{res}{space 2} .3863528{col 26}{space 2} .3431588{col 37}{space 1}    1.13{col 46}{space 3}0.274{col 54}{space 4}-.3294639{col 67}{space 3}  1.10217
{txt}{space 8}left {c |}{col 14}{res}{space 2} .3377986{col 26}{space 2} .5168719{col 37}{space 1}    0.65{col 46}{space 3}0.521{col 54}{space 4}-.7403773{col 67}{space 3} 1.415974
{txt}{space 9}bbr {c |}{col 14}{res}{space 2} .6702466{col 26}{space 2} .4440729{col 37}{space 1}    1.51{col 46}{space 3}0.147{col 54}{space 4}-.2560732{col 67}{space 3} 1.596566
{txt}{space 10}dr {c |}{col 14}{res}{space 2}-.3874664{col 26}{space 2} .5170647{col 37}{space 1}   -0.75{col 46}{space 3}0.462{col 54}{space 4}-1.466044{col 67}{space 3} .6911117
{txt}{space 7}_cons {c |}{col 14}{res}{space 2}-1.106536{col 26}{space 2}  .823722{col 37}{space 1}   -1.34{col 46}{space 3}0.194{col 54}{space 4} -2.82479{col 67}{space 3} .6117177
{txt}{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
     sigma_u {c |} {res} .94358901
     {txt}sigma_e {c |} {res}  1.861978
         {txt}rho {c |} {res} .20433655{txt}   (fraction of variance due to u_i)
{hline 13}{c BT}{hline 64}

{com}. estimates store q1
{txt}
{com}. 
. *2 - Aggregate KL (a)
. 
. *linear
. xtreg cg_bal_gdp l.cg_bal_gdp ldef_pig pig gdp_grwth lp_n ln_infl r_intrt unemp_ilo dist_ex_opp right left bbr dr, fe robust cluster(cid)

{txt}Fixed-effects (within) regression               Number of obs      = {res}     1197
{txt}Group variable: {res}cid                             {txt}Number of groups   = {res}       79

{txt}R-sq:  within  = {res}0.4791                         {txt}Obs per group: min = {res}        1
{txt}       between = {res}0.9399                                        {txt}avg = {res}     15.2
{txt}       overall = {res}0.7055                                        {txt}max = {res}       32

                                                {txt}F({res}13{txt},{res}78{txt})           = {res}    20.19
{txt}corr(u_i, Xb)  = {res}0.5090                         {txt}Prob > F           =    {res}0.0000

{txt}{ralign 78:(Std. Err. adjusted for {res:79} clusters in cid)}
{hline 13}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 14}{c |}{col 26}    Robust
{col 1}  cg_bal_gdp{col 14}{c |}      Coef.{col 26}   Std. Err.{col 38}      t{col 46}   P>|t|{col 54}     [95% Con{col 67}f. Interval]
{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 2}cg_bal_gdp {c |}
{space 9}L1. {c |}{col 14}{res}{space 2} .5080981{col 26}{space 2} .0470257{col 37}{space 1}   10.80{col 46}{space 3}0.000{col 54}{space 4} .4144771{col 67}{space 3} .6017191
{txt}{space 12} {c |}
{space 4}ldef_pig {c |}{col 14}{res}{space 2} .0861541{col 26}{space 2} .0246872{col 37}{space 1}    3.49{col 46}{space 3}0.001{col 54}{space 4} .0370056{col 67}{space 3} .1353025
{txt}{space 9}pig {c |}{col 14}{res}{space 2}-.2241059{col 26}{space 2} .0954458{col 37}{space 1}   -2.35{col 46}{space 3}0.021{col 54}{space 4}-.4141239{col 67}{space 3}-.0340879
{txt}{space 3}gdp_grwth {c |}{col 14}{res}{space 2} .2406439{col 26}{space 2} .0262274{col 37}{space 1}    9.18{col 46}{space 3}0.000{col 54}{space 4} .1884292{col 67}{space 3} .2928587
{txt}{space 8}lp_n {c |}{col 14}{res}{space 2}-.8587538{col 26}{space 2} .3064681{col 37}{space 1}   -2.80{col 46}{space 3}0.006{col 54}{space 4}-1.468885{col 67}{space 3}-.2486226
{txt}{space 5}ln_infl {c |}{col 14}{res}{space 2}  .115764{col 26}{space 2} .1001136{col 37}{space 1}    1.16{col 46}{space 3}0.251{col 54}{space 4} -.083547{col 67}{space 3} .3150749
{txt}{space 5}r_intrt {c |}{col 14}{res}{space 2}-.0119101{col 26}{space 2} .0152411{col 37}{space 1}   -0.78{col 46}{space 3}0.437{col 54}{space 4}-.0422529{col 67}{space 3} .0184327
{txt}{space 3}unemp_ilo {c |}{col 14}{res}{space 2} -.101123{col 26}{space 2} .0422907{col 37}{space 1}   -2.39{col 46}{space 3}0.019{col 54}{space 4}-.1853172{col 67}{space 3}-.0169287
{txt}{space 1}dist_ex_opp {c |}{col 14}{res}{space 2} .2154277{col 26}{space 2} .1035174{col 37}{space 1}    2.08{col 46}{space 3}0.041{col 54}{space 4} .0093403{col 67}{space 3}  .421515
{txt}{space 7}right {c |}{col 14}{res}{space 2} .7389519{col 26}{space 2} .2913947{col 37}{space 1}    2.54{col 46}{space 3}0.013{col 54}{space 4} .1588297{col 67}{space 3} 1.319074
{txt}{space 8}left {c |}{col 14}{res}{space 2} .0314762{col 26}{space 2} .4836506{col 37}{space 1}    0.07{col 46}{space 3}0.948{col 54}{space 4}-.9313981{col 67}{space 3} .9943504
{txt}{space 9}bbr {c |}{col 14}{res}{space 2} .7570384{col 26}{space 2} .3288176{col 37}{space 1}    2.30{col 46}{space 3}0.024{col 54}{space 4} .1024128{col 67}{space 3} 1.411664
{txt}{space 10}dr {c |}{col 14}{res}{space 2} .1484579{col 26}{space 2} .3202982{col 37}{space 1}    0.46{col 46}{space 3}0.644{col 54}{space 4}-.4892067{col 67}{space 3} .7861226
{txt}{space 7}_cons {c |}{col 14}{res}{space 2}-1.378974{col 26}{space 2} .5055637{col 37}{space 1}   -2.73{col 46}{space 3}0.008{col 54}{space 4}-2.385474{col 67}{space 3}-.3724742
{txt}{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
     sigma_u {c |} {res} 2.6483437
     {txt}sigma_e {c |} {res} 2.2006713
         {txt}rho {c |} {res} .59154208{txt}   (fraction of variance due to u_i)
{hline 13}{c BT}{hline 64}

{com}. estimates store l2
{txt}
{com}. 
. gen linear2=_b[lp_n]*lp_n
{txt}
{com}. 
. *quadratic
. xtreg cg_bal_gdp l.cg_bal_gdp ldef_pig pig gdp_grwth lp_n lp_nsq ln_infl r_intrt unemp_ilo dist_ex_opp right left bbr dr, fe robust cluster(cid)

{txt}Fixed-effects (within) regression               Number of obs      = {res}     1197
{txt}Group variable: {res}cid                             {txt}Number of groups   = {res}       79

{txt}R-sq:  within  = {res}0.4808                         {txt}Obs per group: min = {res}        1
{txt}       between = {res}0.9383                                        {txt}avg = {res}     15.2
{txt}       overall = {res}0.7057                                        {txt}max = {res}       32

                                                {txt}F({res}14{txt},{res}78{txt})           = {res}    19.35
{txt}corr(u_i, Xb)  = {res}0.5054                         {txt}Prob > F           =    {res}0.0000

{txt}{ralign 78:(Std. Err. adjusted for {res:79} clusters in cid)}
{hline 13}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 14}{c |}{col 26}    Robust
{col 1}  cg_bal_gdp{col 14}{c |}      Coef.{col 26}   Std. Err.{col 38}      t{col 46}   P>|t|{col 54}     [95% Con{col 67}f. Interval]
{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 2}cg_bal_gdp {c |}
{space 9}L1. {c |}{col 14}{res}{space 2} .5083674{col 26}{space 2} .0466914{col 37}{space 1}   10.89{col 46}{space 3}0.000{col 54}{space 4} .4154119{col 67}{space 3} .6013229
{txt}{space 12} {c |}
{space 4}ldef_pig {c |}{col 14}{res}{space 2} .0865976{col 26}{space 2} .0244288{col 37}{space 1}    3.54{col 46}{space 3}0.001{col 54}{space 4} .0379637{col 67}{space 3} .1352315
{txt}{space 9}pig {c |}{col 14}{res}{space 2} -.224757{col 26}{space 2} .0959515{col 37}{space 1}   -2.34{col 46}{space 3}0.022{col 54}{space 4}-.4157818{col 67}{space 3}-.0337321
{txt}{space 3}gdp_grwth {c |}{col 14}{res}{space 2} .2407331{col 26}{space 2}  .026279{col 37}{space 1}    9.16{col 46}{space 3}0.000{col 54}{space 4} .1884155{col 67}{space 3} .2930506
{txt}{space 8}lp_n {c |}{col 14}{res}{space 2}-3.097693{col 26}{space 2} 1.242601{col 37}{space 1}   -2.49{col 46}{space 3}0.015{col 54}{space 4}-5.571521{col 67}{space 3}-.6238646
{txt}{space 6}lp_nsq {c |}{col 14}{res}{space 2} 3.228917{col 26}{space 2} 1.591491{col 37}{space 1}    2.03{col 46}{space 3}0.046{col 54}{space 4} .0605012{col 67}{space 3} 6.397333
{txt}{space 5}ln_infl {c |}{col 14}{res}{space 2} .1222643{col 26}{space 2}  .099834{col 37}{space 1}    1.22{col 46}{space 3}0.224{col 54}{space 4}  -.07649{col 67}{space 3} .3210187
{txt}{space 5}r_intrt {c |}{col 14}{res}{space 2}-.0119305{col 26}{space 2}  .015144{col 37}{space 1}   -0.79{col 46}{space 3}0.433{col 54}{space 4}-.0420799{col 67}{space 3}  .018219
{txt}{space 3}unemp_ilo {c |}{col 14}{res}{space 2}-.1026617{col 26}{space 2} .0424973{col 37}{space 1}   -2.42{col 46}{space 3}0.018{col 54}{space 4}-.1872672{col 67}{space 3}-.0180561
{txt}{space 1}dist_ex_opp {c |}{col 14}{res}{space 2} .2149796{col 26}{space 2} .1031359{col 37}{space 1}    2.08{col 46}{space 3}0.040{col 54}{space 4} .0096519{col 67}{space 3} .4203074
{txt}{space 7}right {c |}{col 14}{res}{space 2} .7654307{col 26}{space 2} .2947018{col 37}{space 1}    2.60{col 46}{space 3}0.011{col 54}{space 4} .1787245{col 67}{space 3} 1.352137
{txt}{space 8}left {c |}{col 14}{res}{space 2} .0673971{col 26}{space 2} .4863644{col 37}{space 1}    0.14{col 46}{space 3}0.890{col 54}{space 4}  -.90088{col 67}{space 3} 1.035674
{txt}{space 9}bbr {c |}{col 14}{res}{space 2} .7542818{col 26}{space 2} .3273611{col 37}{space 1}    2.30{col 46}{space 3}0.024{col 54}{space 4} .1025559{col 67}{space 3} 1.406008
{txt}{space 10}dr {c |}{col 14}{res}{space 2} .1772532{col 26}{space 2} .3208317{col 37}{space 1}    0.55{col 46}{space 3}0.582{col 54}{space 4}-.4614736{col 67}{space 3} .8159799
{txt}{space 7}_cons {c |}{col 14}{res}{space 2} -1.38308{col 26}{space 2} .5031936{col 37}{space 1}   -2.75{col 46}{space 3}0.007{col 54}{space 4}-2.384861{col 67}{space 3}-.3812983
{txt}{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
     sigma_u {c |} {res} 2.6497613
     {txt}sigma_e {c |} {res} 2.1980488
         {txt}rho {c |} {res} .59237664{txt}   (fraction of variance due to u_i)
{hline 13}{c BT}{hline 64}

{com}. estimates store q2
{txt}
{com}. 
. gen quadra2=_b[lp_n]*lp_n+_b[lp_nsq]*lp_n^2
{txt}
{com}. 
. *Figure 2a (linear)
. sort lp_n
{txt}
{com}. twoway (line linear2 lp_n, lc(black)), graphregion(color(white)) plotregion(lstyle(foreground)) ylabel(0(.1)-1, angle(0) labsize(medlarge)) ytitle("Central Government Deficit (%GDP)", size(medlarge)) xlabel(0(.1)1, labsize(medlarge)) xtitle(" " "Loss Probability", size(medlarge))  note(" " "Estimates are calculated from column 3 of Table 2", size(medium))
{res}{txt}
{com}. graph export "figure_2a.eps", as(eps) preview(off) replace
{txt}(file figure_2a.eps written in EPS format)

{com}. 
. *Figure 2b (quadra)
. sort lp_n
{txt}
{com}. twoway (line quadra2 lp_n, lc(black)), graphregion(color(white)) plotregion(lstyle(foreground)) ylabel(0(.1)-1, angle(0) labsize(medlarge)) ytitle("Central Government Deficit (%GDP)", size(medlarge)) xlabel(0(.1)1, labsize(medlarge)) xtitle(" " "Loss Probabilities", size(medlarge)) xline(.48, lp(dash) lc(gs11)) text(-.24 .39 "pplur*=0", size(medlarge)) note(" " "Estimates are calculated from column 4 of Table 2", size(medium)) yscale(alt)
{res}{txt}
{com}. graph export "figure_2b.eps", as(eps) preview(off) replace
{txt}(file figure_2b.eps written in EPS format)

{com}. 
. *2. Aggregate KL (b)
. 
. *linear
. sort cid year
{txt}
{com}. xtreg cg_bal_gdp l.cg_bal_gdp ldef_pig pig gdp_grwth lp2_n ln_infl r_intrt unemp_ilo dist_ex_opp right left bbr dr, fe robust cluster(cid)

{txt}Fixed-effects (within) regression               Number of obs      = {res}     1197
{txt}Group variable: {res}cid                             {txt}Number of groups   = {res}       79

{txt}R-sq:  within  = {res}0.4790                         {txt}Obs per group: min = {res}        1
{txt}       between = {res}0.9382                                        {txt}avg = {res}     15.2
{txt}       overall = {res}0.7031                                        {txt}max = {res}       32

                                                {txt}F({res}13{txt},{res}78{txt})           = {res}    18.96
{txt}corr(u_i, Xb)  = {res}0.5059                         {txt}Prob > F           =    {res}0.0000

{txt}{ralign 78:(Std. Err. adjusted for {res:79} clusters in cid)}
{hline 13}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 14}{c |}{col 26}    Robust
{col 1}  cg_bal_gdp{col 14}{c |}      Coef.{col 26}   Std. Err.{col 38}      t{col 46}   P>|t|{col 54}     [95% Con{col 67}f. Interval]
{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 2}cg_bal_gdp {c |}
{space 9}L1. {c |}{col 14}{res}{space 2} .5048428{col 26}{space 2} .0466676{col 37}{space 1}   10.82{col 46}{space 3}0.000{col 54}{space 4} .4119347{col 67}{space 3}  .597751
{txt}{space 12} {c |}
{space 4}ldef_pig {c |}{col 14}{res}{space 2} .0850916{col 26}{space 2} .0244608{col 37}{space 1}    3.48{col 46}{space 3}0.001{col 54}{space 4}  .036394{col 67}{space 3} .1337893
{txt}{space 9}pig {c |}{col 14}{res}{space 2}-.2186899{col 26}{space 2} .0958075{col 37}{space 1}   -2.28{col 46}{space 3}0.025{col 54}{space 4} -.409428{col 67}{space 3}-.0279518
{txt}{space 3}gdp_grwth {c |}{col 14}{res}{space 2} .2401527{col 26}{space 2} .0261013{col 37}{space 1}    9.20{col 46}{space 3}0.000{col 54}{space 4} .1881891{col 67}{space 3} .2921164
{txt}{space 7}lp2_n {c |}{col 14}{res}{space 2}-.7505409{col 26}{space 2} .3458984{col 37}{space 1}   -2.17{col 46}{space 3}0.033{col 54}{space 4}-1.439172{col 67}{space 3}  -.06191
{txt}{space 5}ln_infl {c |}{col 14}{res}{space 2} .1183816{col 26}{space 2} .1025218{col 37}{space 1}    1.15{col 46}{space 3}0.252{col 54}{space 4}-.0857236{col 67}{space 3} .3224868
{txt}{space 5}r_intrt {c |}{col 14}{res}{space 2}-.0121425{col 26}{space 2} .0155552{col 37}{space 1}   -0.78{col 46}{space 3}0.437{col 54}{space 4}-.0431105{col 67}{space 3} .0188255
{txt}{space 3}unemp_ilo {c |}{col 14}{res}{space 2}-.1034113{col 26}{space 2} .0423003{col 37}{space 1}   -2.44{col 46}{space 3}0.017{col 54}{space 4}-.1876247{col 67}{space 3} -.019198
{txt}{space 1}dist_ex_opp {c |}{col 14}{res}{space 2} .2264016{col 26}{space 2} .1032595{col 37}{space 1}    2.19{col 46}{space 3}0.031{col 54}{space 4} .0208277{col 67}{space 3} .4319755
{txt}{space 7}right {c |}{col 14}{res}{space 2} .7602062{col 26}{space 2} .2929943{col 37}{space 1}    2.59{col 46}{space 3}0.011{col 54}{space 4} .1768993{col 67}{space 3} 1.343513
{txt}{space 8}left {c |}{col 14}{res}{space 2}  .011612{col 26}{space 2} .4858186{col 37}{space 1}    0.02{col 46}{space 3}0.981{col 54}{space 4}-.9555786{col 67}{space 3} .9788026
{txt}{space 9}bbr {c |}{col 14}{res}{space 2} .7490048{col 26}{space 2} .3277677{col 37}{space 1}    2.29{col 46}{space 3}0.025{col 54}{space 4} .0964694{col 67}{space 3}  1.40154
{txt}{space 10}dr {c |}{col 14}{res}{space 2} .1407316{col 26}{space 2} .3210611{col 37}{space 1}    0.44{col 46}{space 3}0.662{col 54}{space 4}-.4984519{col 67}{space 3} .7799151
{txt}{space 7}_cons {c |}{col 14}{res}{space 2}-1.358516{col 26}{space 2} .5247777{col 37}{space 1}   -2.59{col 46}{space 3}0.011{col 54}{space 4}-2.403268{col 67}{space 3}-.3137638
{txt}{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
     sigma_u {c |} {res} 2.6788666
     {txt}sigma_e {c |} {res} 2.2008051
         {txt}rho {c |} {res} .59703862{txt}   (fraction of variance due to u_i)
{hline 13}{c BT}{hline 64}

{com}. estimates store l3
{txt}
{com}. 
. *quadra
. xtreg cg_bal_gdp l.cg_bal_gdp ldef_pig pig gdp_grwth lp2_n lp2_nsq ln_infl r_intrt unemp_ilo dist_ex_opp right left bbr dr, fe robust cluster(cid)

{txt}Fixed-effects (within) regression               Number of obs      = {res}     1197
{txt}Group variable: {res}cid                             {txt}Number of groups   = {res}       79

{txt}R-sq:  within  = {res}0.4791                         {txt}Obs per group: min = {res}        1
{txt}       between = {res}0.9383                                        {txt}avg = {res}     15.2
{txt}       overall = {res}0.7034                                        {txt}max = {res}       32

                                                {txt}F({res}14{txt},{res}78{txt})           = {res}    18.09
{txt}corr(u_i, Xb)  = {res}0.5058                         {txt}Prob > F           =    {res}0.0000

{txt}{ralign 78:(Std. Err. adjusted for {res:79} clusters in cid)}
{hline 13}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 14}{c |}{col 26}    Robust
{col 1}  cg_bal_gdp{col 14}{c |}      Coef.{col 26}   Std. Err.{col 38}      t{col 46}   P>|t|{col 54}     [95% Con{col 67}f. Interval]
{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 2}cg_bal_gdp {c |}
{space 9}L1. {c |}{col 14}{res}{space 2} .5052821{col 26}{space 2} .0466133{col 37}{space 1}   10.84{col 46}{space 3}0.000{col 54}{space 4} .4124822{col 67}{space 3} .5980819
{txt}{space 12} {c |}
{space 4}ldef_pig {c |}{col 14}{res}{space 2} .0852543{col 26}{space 2} .0244461{col 37}{space 1}    3.49{col 46}{space 3}0.001{col 54}{space 4} .0365859{col 67}{space 3} .1339226
{txt}{space 9}pig {c |}{col 14}{res}{space 2}-.2194649{col 26}{space 2} .0955774{col 37}{space 1}   -2.30{col 46}{space 3}0.024{col 54}{space 4}-.4097449{col 67}{space 3} -.029185
{txt}{space 3}gdp_grwth {c |}{col 14}{res}{space 2} .2400806{col 26}{space 2}  .026137{col 37}{space 1}    9.19{col 46}{space 3}0.000{col 54}{space 4} .1880458{col 67}{space 3} .2921154
{txt}{space 7}lp2_n {c |}{col 14}{res}{space 2}-1.305601{col 26}{space 2} 1.060524{col 37}{space 1}   -1.23{col 46}{space 3}0.222{col 54}{space 4}-3.416943{col 67}{space 3} .8057407
{txt}{space 5}lp2_nsq {c |}{col 14}{res}{space 2} .7808049{col 26}{space 2} 1.548407{col 37}{space 1}    0.50{col 46}{space 3}0.615{col 54}{space 4}-2.301836{col 67}{space 3} 3.863446
{txt}{space 5}ln_infl {c |}{col 14}{res}{space 2} .1163189{col 26}{space 2}  .101168{col 37}{space 1}    1.15{col 46}{space 3}0.254{col 54}{space 4} -.085091{col 67}{space 3} .3177288
{txt}{space 5}r_intrt {c |}{col 14}{res}{space 2}-.0123578{col 26}{space 2} .0154049{col 37}{space 1}   -0.80{col 46}{space 3}0.425{col 54}{space 4}-.0430265{col 67}{space 3} .0183109
{txt}{space 3}unemp_ilo {c |}{col 14}{res}{space 2}-.1037489{col 26}{space 2} .0425239{col 37}{space 1}   -2.44{col 46}{space 3}0.017{col 54}{space 4}-.1884074{col 67}{space 3}-.0190903
{txt}{space 1}dist_ex_opp {c |}{col 14}{res}{space 2} .2252696{col 26}{space 2}  .102876{col 37}{space 1}    2.19{col 46}{space 3}0.032{col 54}{space 4} .0204593{col 67}{space 3} .4300799
{txt}{space 7}right {c |}{col 14}{res}{space 2} .7624959{col 26}{space 2} .2948851{col 37}{space 1}    2.59{col 46}{space 3}0.012{col 54}{space 4} .1754248{col 67}{space 3} 1.349567
{txt}{space 8}left {c |}{col 14}{res}{space 2} .0176088{col 26}{space 2} .4864749{col 37}{space 1}    0.04{col 46}{space 3}0.971{col 54}{space 4}-.9508884{col 67}{space 3} .9861061
{txt}{space 9}bbr {c |}{col 14}{res}{space 2} .7450595{col 26}{space 2} .3273369{col 37}{space 1}    2.28{col 46}{space 3}0.026{col 54}{space 4} .0933818{col 67}{space 3} 1.396737
{txt}{space 10}dr {c |}{col 14}{res}{space 2}  .145871{col 26}{space 2} .3219956{col 37}{space 1}    0.45{col 46}{space 3}0.652{col 54}{space 4} -.495173{col 67}{space 3}  .786915
{txt}{space 7}_cons {c |}{col 14}{res}{space 2}-1.347321{col 26}{space 2} .5214336{col 37}{space 1}   -2.58{col 46}{space 3}0.012{col 54}{space 4}-2.385416{col 67}{space 3}-.3092268
{txt}{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
     sigma_u {c |} {res} 2.6746954
     {txt}sigma_e {c |} {res} 2.2015588
         {txt}rho {c |} {res} .59612373{txt}   (fraction of variance due to u_i)
{hline 13}{c BT}{hline 64}

{com}. estimates store q3
{txt}
{com}. 
. estout l1 q1 l2 q2 l3 q3 using "table2.tex", cells(b(star fmt(%9.2f)) se(par)) stats(r2_a N, fmt(%9.3f %9.0g) labels(R-squared)) legend label collabels(none) varlabels(_cons Constant) replace
{res}{txt}(output written to {browse  `"table2.tex"'})

{com}. 
. **Table 3 - Interaction with fiscal rules
. *___________________________________________
. *1. Aggregate KL (a)
. 
. *interactions
. gen lpn_bbr=lp_n*bbr
{txt}(1867 missing values generated)

{com}. gen lpn_dr=lp_n*dr
{txt}(1867 missing values generated)

{com}. sort cid year
{txt}
{com}. 
. * linear
. xtreg cg_bal_gdp l.cg_bal_gdp ldef_pig pig gdp_grwth lp_n ln_infl r_intrt unemp_ilo dist_ex_opp right left bbr dr lpn_bbr lpn_dr, fe robust cluster(cid)

{txt}Fixed-effects (within) regression               Number of obs      = {res}     1197
{txt}Group variable: {res}cid                             {txt}Number of groups   = {res}       79

{txt}R-sq:  within  = {res}0.4792                         {txt}Obs per group: min = {res}        1
{txt}       between = {res}0.9397                                        {txt}avg = {res}     15.2
{txt}       overall = {res}0.7056                                        {txt}max = {res}       32

                                                {txt}F({res}15{txt},{res}78{txt})           = {res}    17.66
{txt}corr(u_i, Xb)  = {res}0.5080                         {txt}Prob > F           =    {res}0.0000

{txt}{ralign 78:(Std. Err. adjusted for {res:79} clusters in cid)}
{hline 13}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 14}{c |}{col 26}    Robust
{col 1}  cg_bal_gdp{col 14}{c |}      Coef.{col 26}   Std. Err.{col 38}      t{col 46}   P>|t|{col 54}     [95% Con{col 67}f. Interval]
{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 2}cg_bal_gdp {c |}
{space 9}L1. {c |}{col 14}{res}{space 2} .5082285{col 26}{space 2} .0469978{col 37}{space 1}   10.81{col 46}{space 3}0.000{col 54}{space 4}  .414663{col 67}{space 3} .6017941
{txt}{space 12} {c |}
{space 4}ldef_pig {c |}{col 14}{res}{space 2} .0862685{col 26}{space 2} .0246973{col 37}{space 1}    3.49{col 46}{space 3}0.001{col 54}{space 4} .0370999{col 67}{space 3} .1354371
{txt}{space 9}pig {c |}{col 14}{res}{space 2}-.2245218{col 26}{space 2} .0957198{col 37}{space 1}   -2.35{col 46}{space 3}0.022{col 54}{space 4}-.4150853{col 67}{space 3}-.0339583
{txt}{space 3}gdp_grwth {c |}{col 14}{res}{space 2} .2402456{col 26}{space 2} .0262595{col 37}{space 1}    9.15{col 46}{space 3}0.000{col 54}{space 4}  .187967{col 67}{space 3} .2925241
{txt}{space 8}lp_n {c |}{col 14}{res}{space 2}-1.038531{col 26}{space 2} .4539369{col 37}{space 1}   -2.29{col 46}{space 3}0.025{col 54}{space 4} -1.94225{col 67}{space 3}-.1348116
{txt}{space 5}ln_infl {c |}{col 14}{res}{space 2} .1151568{col 26}{space 2} .0999809{col 37}{space 1}    1.15{col 46}{space 3}0.253{col 54}{space 4}-.0838899{col 67}{space 3} .3142035
{txt}{space 5}r_intrt {c |}{col 14}{res}{space 2}-.0117894{col 26}{space 2} .0152564{col 37}{space 1}   -0.77{col 46}{space 3}0.442{col 54}{space 4}-.0421625{col 67}{space 3} .0185838
{txt}{space 3}unemp_ilo {c |}{col 14}{res}{space 2}-.1021046{col 26}{space 2} .0420554{col 37}{space 1}   -2.43{col 46}{space 3}0.017{col 54}{space 4}-.1858305{col 67}{space 3}-.0183788
{txt}{space 1}dist_ex_opp {c |}{col 14}{res}{space 2} .2154951{col 26}{space 2} .1034459{col 37}{space 1}    2.08{col 46}{space 3}0.041{col 54}{space 4} .0095501{col 67}{space 3}   .42144
{txt}{space 7}right {c |}{col 14}{res}{space 2} .7388286{col 26}{space 2} .2916593{col 37}{space 1}    2.53{col 46}{space 3}0.013{col 54}{space 4} .1581795{col 67}{space 3} 1.319478
{txt}{space 8}left {c |}{col 14}{res}{space 2} .0342119{col 26}{space 2} .4839565{col 37}{space 1}    0.07{col 46}{space 3}0.944{col 54}{space 4}-.9292715{col 67}{space 3} .9976954
{txt}{space 9}bbr {c |}{col 14}{res}{space 2} .7380323{col 26}{space 2} .3331878{col 37}{space 1}    2.22{col 46}{space 3}0.030{col 54}{space 4} .0747062{col 67}{space 3} 1.401358
{txt}{space 10}dr {c |}{col 14}{res}{space 2} .1275248{col 26}{space 2} .3207644{col 37}{space 1}    0.40{col 46}{space 3}0.692{col 54}{space 4}-.5110681{col 67}{space 3} .7661177
{txt}{space 5}lpn_bbr {c |}{col 14}{res}{space 2} .2801014{col 26}{space 2} .7119605{col 37}{space 1}    0.39{col 46}{space 3}0.695{col 54}{space 4}-1.137303{col 67}{space 3} 1.697506
{txt}{space 6}lpn_dr {c |}{col 14}{res}{space 2} .2283151{col 26}{space 2} .6266421{col 37}{space 1}    0.36{col 46}{space 3}0.717{col 54}{space 4}-1.019234{col 67}{space 3} 1.475864
{txt}{space 7}_cons {c |}{col 14}{res}{space 2}-1.356876{col 26}{space 2} .5017556{col 37}{space 1}   -2.70{col 46}{space 3}0.008{col 54}{space 4}-2.355795{col 67}{space 3}-.3579576
{txt}{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
     sigma_u {c |} {res} 2.6465255
     {txt}sigma_e {c |} {res} 2.2022885
         {txt}rho {c |} {res} .59085504{txt}   (fraction of variance due to u_i)
{hline 13}{c BT}{hline 64}

{com}. estimates store fr1
{txt}
{com}. 
. *quadratic
. gen lpnsq_bbr=lp_nsq*bbr 
{txt}(1867 missing values generated)

{com}. gen lpnsq_dr=lp_nsq*dr
{txt}(1867 missing values generated)

{com}. xtreg cg_bal_gdp l.cg_bal_gdp ldef_pig pig gdp_grwth lp_n lp_nsq ln_infl r_intrt unemp_ilo dist_ex_opp right left bbr dr lpn_bbr lpn_dr lpnsq_bbr lpnsq_dr, fe robust cluster(cid)

{txt}Fixed-effects (within) regression               Number of obs      = {res}     1197
{txt}Group variable: {res}cid                             {txt}Number of groups   = {res}       79

{txt}R-sq:  within  = {res}0.4814                         {txt}Obs per group: min = {res}        1
{txt}       between = {res}0.9378                                        {txt}avg = {res}     15.2
{txt}       overall = {res}0.7058                                        {txt}max = {res}       32

                                                {txt}F({res}18{txt},{res}78{txt})           = {res}    15.69
{txt}corr(u_i, Xb)  = {res}0.5031                         {txt}Prob > F           =    {res}0.0000

{txt}{ralign 78:(Std. Err. adjusted for {res:79} clusters in cid)}
{hline 13}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 14}{c |}{col 26}    Robust
{col 1}  cg_bal_gdp{col 14}{c |}      Coef.{col 26}   Std. Err.{col 38}      t{col 46}   P>|t|{col 54}     [95% Con{col 67}f. Interval]
{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 2}cg_bal_gdp {c |}
{space 9}L1. {c |}{col 14}{res}{space 2} .5085947{col 26}{space 2} .0466218{col 37}{space 1}   10.91{col 46}{space 3}0.000{col 54}{space 4} .4157778{col 67}{space 3} .6014115
{txt}{space 12} {c |}
{space 4}ldef_pig {c |}{col 14}{res}{space 2} .0868305{col 26}{space 2} .0244117{col 37}{space 1}    3.56{col 46}{space 3}0.001{col 54}{space 4} .0382306{col 67}{space 3} .1354304
{txt}{space 9}pig {c |}{col 14}{res}{space 2}-.2258111{col 26}{space 2} .0960907{col 37}{space 1}   -2.35{col 46}{space 3}0.021{col 54}{space 4} -.417113{col 67}{space 3}-.0345093
{txt}{space 3}gdp_grwth {c |}{col 14}{res}{space 2} .2398914{col 26}{space 2} .0263838{col 37}{space 1}    9.09{col 46}{space 3}0.000{col 54}{space 4} .1873653{col 67}{space 3} .2924176
{txt}{space 8}lp_n {c |}{col 14}{res}{space 2}-3.398026{col 26}{space 2}   2.1242{col 37}{space 1}   -1.60{col 46}{space 3}0.114{col 54}{space 4}-7.626983{col 67}{space 3} .8309309
{txt}{space 6}lp_nsq {c |}{col 14}{res}{space 2} 3.302156{col 26}{space 2} 2.637385{col 37}{space 1}    1.25{col 46}{space 3}0.214{col 54}{space 4}-1.948475{col 67}{space 3} 8.552787
{txt}{space 5}ln_infl {c |}{col 14}{res}{space 2} .1221132{col 26}{space 2}  .099738{col 37}{space 1}    1.22{col 46}{space 3}0.225{col 54}{space 4}-.0764498{col 67}{space 3} .3206763
{txt}{space 5}r_intrt {c |}{col 14}{res}{space 2}-.0118083{col 26}{space 2} .0151439{col 37}{space 1}   -0.78{col 46}{space 3}0.438{col 54}{space 4}-.0419576{col 67}{space 3}  .018341
{txt}{space 3}unemp_ilo {c |}{col 14}{res}{space 2}-.1042545{col 26}{space 2} .0420237{col 37}{space 1}   -2.48{col 46}{space 3}0.015{col 54}{space 4}-.1879173{col 67}{space 3}-.0205917
{txt}{space 1}dist_ex_opp {c |}{col 14}{res}{space 2} .2161476{col 26}{space 2} .1029591{col 37}{space 1}    2.10{col 46}{space 3}0.039{col 54}{space 4} .0111718{col 67}{space 3} .4211234
{txt}{space 7}right {c |}{col 14}{res}{space 2} .7750252{col 26}{space 2} .2939485{col 37}{space 1}    2.64{col 46}{space 3}0.010{col 54}{space 4} .1898187{col 67}{space 3} 1.360232
{txt}{space 8}left {c |}{col 14}{res}{space 2}  .073033{col 26}{space 2} .4882509{col 37}{space 1}    0.15{col 46}{space 3}0.881{col 54}{space 4}-.8989999{col 67}{space 3} 1.045066
{txt}{space 9}bbr {c |}{col 14}{res}{space 2} .7447195{col 26}{space 2} .3318052{col 37}{space 1}    2.24{col 46}{space 3}0.028{col 54}{space 4} .0841462{col 67}{space 3} 1.405293
{txt}{space 10}dr {c |}{col 14}{res}{space 2}  .134243{col 26}{space 2} .3233099{col 37}{space 1}    0.42{col 46}{space 3}0.679{col 54}{space 4}-.5094176{col 67}{space 3} .7779036
{txt}{space 5}lpn_bbr {c |}{col 14}{res}{space 2} 1.068408{col 26}{space 2} 2.556988{col 37}{space 1}    0.42{col 46}{space 3}0.677{col 54}{space 4}-4.022164{col 67}{space 3}  6.15898
{txt}{space 6}lpn_dr {c |}{col 14}{res}{space 2}-1.055081{col 26}{space 2} 2.350535{col 37}{space 1}   -0.45{col 46}{space 3}0.655{col 54}{space 4}-5.734637{col 67}{space 3} 3.624475
{txt}{space 3}lpnsq_bbr {c |}{col 14}{res}{space 2}-1.229337{col 26}{space 2} 3.326007{col 37}{space 1}   -0.37{col 46}{space 3}0.713{col 54}{space 4}-7.850908{col 67}{space 3} 5.392234
{txt}{space 4}lpnsq_dr {c |}{col 14}{res}{space 2}  2.54655{col 26}{space 2} 3.219965{col 37}{space 1}    0.79{col 46}{space 3}0.431{col 54}{space 4}-3.863908{col 67}{space 3} 8.957009
{txt}{space 7}_cons {c |}{col 14}{res}{space 2}  -1.3534{col 26}{space 2} .4924765{col 37}{space 1}   -2.75{col 46}{space 3}0.007{col 54}{space 4}-2.333845{col 67}{space 3}-.3729544
{txt}{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
     sigma_u {c |} {res} 2.6477447
     {txt}sigma_e {c |} {res} 2.2007962
         {txt}rho {c |} {res} .59140535{txt}   (fraction of variance due to u_i)
{hline 13}{c BT}{hline 64}

{com}. estimates store fr2
{txt}
{com}. 
. *2. Aggregate KL (b)
. 
. *linear
. gen lp2n_bbr=lp2_n*bbr
{txt}(1867 missing values generated)

{com}. gen lp2n_dr=lp2_n*dr
{txt}(1867 missing values generated)

{com}. 
. xtreg cg_bal_gdp l.cg_bal_gdp ldef_pig pig gdp_grwth lp2_n ln_infl r_intrt unemp_ilo dist_ex_opp right left bbr dr lp2n_bbr lp2n_dr, fe robust cluster(cid)

{txt}Fixed-effects (within) regression               Number of obs      = {res}     1197
{txt}Group variable: {res}cid                             {txt}Number of groups   = {res}       79

{txt}R-sq:  within  = {res}0.4794                         {txt}Obs per group: min = {res}        1
{txt}       between = {res}0.9380                                        {txt}avg = {res}     15.2
{txt}       overall = {res}0.7029                                        {txt}max = {res}       32

                                                {txt}F({res}15{txt},{res}78{txt})           = {res}    16.50
{txt}corr(u_i, Xb)  = {res}0.5050                         {txt}Prob > F           =    {res}0.0000

{txt}{ralign 78:(Std. Err. adjusted for {res:79} clusters in cid)}
{hline 13}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 14}{c |}{col 26}    Robust
{col 1}  cg_bal_gdp{col 14}{c |}      Coef.{col 26}   Std. Err.{col 38}      t{col 46}   P>|t|{col 54}     [95% Con{col 67}f. Interval]
{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 2}cg_bal_gdp {c |}
{space 9}L1. {c |}{col 14}{res}{space 2} .5046651{col 26}{space 2} .0468062{col 37}{space 1}   10.78{col 46}{space 3}0.000{col 54}{space 4} .4114812{col 67}{space 3}  .597849
{txt}{space 12} {c |}
{space 4}ldef_pig {c |}{col 14}{res}{space 2}  .084861{col 26}{space 2} .0245897{col 37}{space 1}    3.45{col 46}{space 3}0.001{col 54}{space 4} .0359067{col 67}{space 3} .1338153
{txt}{space 9}pig {c |}{col 14}{res}{space 2}-.2200545{col 26}{space 2}  .094954{col 37}{space 1}   -2.32{col 46}{space 3}0.023{col 54}{space 4}-.4090934{col 67}{space 3}-.0310157
{txt}{space 3}gdp_grwth {c |}{col 14}{res}{space 2} .2405305{col 26}{space 2} .0260476{col 37}{space 1}    9.23{col 46}{space 3}0.000{col 54}{space 4} .1886738{col 67}{space 3} .2923872
{txt}{space 7}lp2_n {c |}{col 14}{res}{space 2}-.5692046{col 26}{space 2}  .492877{col 37}{space 1}   -1.15{col 46}{space 3}0.252{col 54}{space 4}-1.550447{col 67}{space 3}  .412038
{txt}{space 5}ln_infl {c |}{col 14}{res}{space 2} .1188311{col 26}{space 2}  .101207{col 37}{space 1}    1.17{col 46}{space 3}0.244{col 54}{space 4}-.0826566{col 67}{space 3} .3203188
{txt}{space 5}r_intrt {c |}{col 14}{res}{space 2}-.0122026{col 26}{space 2}  .015547{col 37}{space 1}   -0.78{col 46}{space 3}0.435{col 54}{space 4}-.0431544{col 67}{space 3} .0187492
{txt}{space 3}unemp_ilo {c |}{col 14}{res}{space 2}-.1026401{col 26}{space 2} .0422132{col 37}{space 1}   -2.43{col 46}{space 3}0.017{col 54}{space 4}-.1866802{col 67}{space 3}-.0186001
{txt}{space 1}dist_ex_opp {c |}{col 14}{res}{space 2} .2236612{col 26}{space 2} .1026912{col 37}{space 1}    2.18{col 46}{space 3}0.032{col 54}{space 4} .0192186{col 67}{space 3} .4281037
{txt}{space 7}right {c |}{col 14}{res}{space 2} .7689292{col 26}{space 2} .2936815{col 37}{space 1}    2.62{col 46}{space 3}0.011{col 54}{space 4} .1842541{col 67}{space 3} 1.353604
{txt}{space 8}left {c |}{col 14}{res}{space 2} .0230511{col 26}{space 2} .4844251{col 37}{space 1}    0.05{col 46}{space 3}0.962{col 54}{space 4}-.9413653{col 67}{space 3} .9874675
{txt}{space 9}bbr {c |}{col 14}{res}{space 2} .7653048{col 26}{space 2} .3372274{col 37}{space 1}    2.27{col 46}{space 3}0.026{col 54}{space 4} .0939366{col 67}{space 3} 1.436673
{txt}{space 10}dr {c |}{col 14}{res}{space 2} .1816127{col 26}{space 2} .3366642{col 37}{space 1}    0.54{col 46}{space 3}0.591{col 54}{space 4}-.4886342{col 67}{space 3} .8518597
{txt}{space 4}lp2n_bbr {c |}{col 14}{res}{space 2}-.0821587{col 26}{space 2} .8149226{col 37}{space 1}   -0.10{col 46}{space 3}0.920{col 54}{space 4}-1.704545{col 67}{space 3} 1.540227
{txt}{space 5}lp2n_dr {c |}{col 14}{res}{space 2}-.5457273{col 26}{space 2} .8004713{col 37}{space 1}   -0.68{col 46}{space 3}0.497{col 54}{space 4}-2.139343{col 67}{space 3} 1.047889
{txt}{space 7}_cons {c |}{col 14}{res}{space 2}-1.388605{col 26}{space 2} .5236746{col 37}{space 1}   -2.65{col 46}{space 3}0.010{col 54}{space 4}-2.431161{col 67}{space 3} -.346049
{txt}{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
     sigma_u {c |} {res} 2.6823959
     {txt}sigma_e {c |} {res} 2.2020394
         {txt}rho {c |} {res}  .5974023{txt}   (fraction of variance due to u_i)
{hline 13}{c BT}{hline 64}

{com}. estimates store fr3
{txt}
{com}. 
. *quadra
. gen lp2nsq_bbr=lp2_nsq*bbr 
{txt}(1867 missing values generated)

{com}. gen lp2nsq_dr=lp2_nsq*dr
{txt}(1867 missing values generated)

{com}. 
. xtreg cg_bal_gdp l.cg_bal_gdp ldef_pig pig gdp_grwth lp2_n lp2_nsq ln_infl r_intrt unemp_ilo dist_ex_opp right left bbr dr lp2n_bbr lp2n_dr lp2nsq_bbr lp2nsq_dr, fe robust cluster(cid)

{txt}Fixed-effects (within) regression               Number of obs      = {res}     1197
{txt}Group variable: {res}cid                             {txt}Number of groups   = {res}       79

{txt}R-sq:  within  = {res}0.4797                         {txt}Obs per group: min = {res}        1
{txt}       between = {res}0.9383                                        {txt}avg = {res}     15.2
{txt}       overall = {res}0.7033                                        {txt}max = {res}       32

                                                {txt}F({res}18{txt},{res}78{txt})           = {res}    15.53
{txt}corr(u_i, Xb)  = {res}0.5064                         {txt}Prob > F           =    {res}0.0000

{txt}{ralign 78:(Std. Err. adjusted for {res:79} clusters in cid)}
{hline 13}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 14}{c |}{col 26}    Robust
{col 1}  cg_bal_gdp{col 14}{c |}      Coef.{col 26}   Std. Err.{col 38}      t{col 46}   P>|t|{col 54}     [95% Con{col 67}f. Interval]
{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 2}cg_bal_gdp {c |}
{space 9}L1. {c |}{col 14}{res}{space 2} .5047803{col 26}{space 2} .0465949{col 37}{space 1}   10.83{col 46}{space 3}0.000{col 54}{space 4} .4120169{col 67}{space 3} .5975437
{txt}{space 12} {c |}
{space 4}ldef_pig {c |}{col 14}{res}{space 2}  .085016{col 26}{space 2}  .024577{col 37}{space 1}    3.46{col 46}{space 3}0.001{col 54}{space 4} .0360869{col 67}{space 3} .1339451
{txt}{space 9}pig {c |}{col 14}{res}{space 2}-.2220294{col 26}{space 2} .0953423{col 37}{space 1}   -2.33{col 46}{space 3}0.022{col 54}{space 4}-.4118414{col 67}{space 3}-.0322174
{txt}{space 3}gdp_grwth {c |}{col 14}{res}{space 2} .2401324{col 26}{space 2}  .026131{col 37}{space 1}    9.19{col 46}{space 3}0.000{col 54}{space 4} .1881095{col 67}{space 3} .2921552
{txt}{space 7}lp2_n {c |}{col 14}{res}{space 2}-.3865524{col 26}{space 2} 1.523811{col 37}{space 1}   -0.25{col 46}{space 3}0.800{col 54}{space 4}-3.420228{col 67}{space 3} 2.647123
{txt}{space 5}lp2_nsq {c |}{col 14}{res}{space 2}-.2655448{col 26}{space 2} 2.230228{col 37}{space 1}   -0.12{col 46}{space 3}0.906{col 54}{space 4}-4.705589{col 67}{space 3} 4.174499
{txt}{space 5}ln_infl {c |}{col 14}{res}{space 2} .1207498{col 26}{space 2} .1000597{col 37}{space 1}    1.21{col 46}{space 3}0.231{col 54}{space 4}-.0784538{col 67}{space 3} .3199533
{txt}{space 5}r_intrt {c |}{col 14}{res}{space 2}-.0122036{col 26}{space 2} .0154296{col 37}{space 1}   -0.79{col 46}{space 3}0.431{col 54}{space 4}-.0429217{col 67}{space 3} .0185144
{txt}{space 3}unemp_ilo {c |}{col 14}{res}{space 2}-.1027324{col 26}{space 2} .0422115{col 37}{space 1}   -2.43{col 46}{space 3}0.017{col 54}{space 4}-.1867691{col 67}{space 3}-.0186957
{txt}{space 1}dist_ex_opp {c |}{col 14}{res}{space 2} .2227962{col 26}{space 2} .1022563{col 37}{space 1}    2.18{col 46}{space 3}0.032{col 54}{space 4} .0192196{col 67}{space 3} .4263728
{txt}{space 7}right {c |}{col 14}{res}{space 2} .7749591{col 26}{space 2}  .296811{col 37}{space 1}    2.61{col 46}{space 3}0.011{col 54}{space 4} .1840538{col 67}{space 3} 1.365864
{txt}{space 8}left {c |}{col 14}{res}{space 2} .0352426{col 26}{space 2} .4800371{col 37}{space 1}    0.07{col 46}{space 3}0.942{col 54}{space 4}-.9204379{col 67}{space 3} .9909231
{txt}{space 9}bbr {c |}{col 14}{res}{space 2} .7750687{col 26}{space 2} .3341058{col 37}{space 1}    2.32{col 46}{space 3}0.023{col 54}{space 4}  .109915{col 67}{space 3} 1.440222
{txt}{space 10}dr {c |}{col 14}{res}{space 2} .1810654{col 26}{space 2} .3378677{col 37}{space 1}    0.54{col 46}{space 3}0.594{col 54}{space 4}-.4915775{col 67}{space 3} .8537083
{txt}{space 4}lp2n_bbr {c |}{col 14}{res}{space 2}-2.331917{col 26}{space 2} 2.684831{col 37}{space 1}   -0.87{col 46}{space 3}0.388{col 54}{space 4}-7.677005{col 67}{space 3} 3.013171
{txt}{space 5}lp2n_dr {c |}{col 14}{res}{space 2} .2796306{col 26}{space 2} 2.723047{col 37}{space 1}    0.10{col 46}{space 3}0.918{col 54}{space 4} -5.14154{col 67}{space 3} 5.700801
{txt}{space 2}lp2nsq_bbr {c |}{col 14}{res}{space 2} 3.274197{col 26}{space 2} 4.244925{col 37}{space 1}    0.77{col 46}{space 3}0.443{col 54}{space 4}  -5.1768{col 67}{space 3} 11.72519
{txt}{space 3}lp2nsq_dr {c |}{col 14}{res}{space 2}-1.207663{col 26}{space 2}  4.15472{col 37}{space 1}   -0.29{col 46}{space 3}0.772{col 54}{space 4}-9.479075{col 67}{space 3}  7.06375
{txt}{space 7}_cons {c |}{col 14}{res}{space 2}-1.392286{col 26}{space 2} .5170171{col 37}{space 1}   -2.69{col 46}{space 3}0.009{col 54}{space 4}-2.421588{col 67}{space 3}-.3629841
{txt}{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
     sigma_u {c |} {res} 2.6804082
     {txt}sigma_e {c |} {res} 2.2043115
         {txt}rho {c |} {res} .59654934{txt}   (fraction of variance due to u_i)
{hline 13}{c BT}{hline 64}

{com}. estimates store fr4
{txt}
{com}. 
. estout fr1 fr2 fr3 fr4 using "table3.tex", cells(b(star fmt(%9.2f)) se(par)) stats(r2_a N, fmt(%9.3f %9.0g) labels(R-squared)) legend label collabels(none) varlabels(_cons Constant) replace
{res}{txt}(output written to {browse  `"table3.tex"'})

{com}. 
. ***________________________________________________________________
. ***Appendix A
. *1. Aggregate KL (a) with liited sample
. 
. *linear
. xtreg cg_bal_gdp l.cg_bal_gdp ldef_pig pig gdp_grwth lp_n ln_infl r_intrt unemp_ilo dist_ex_opp right left bbr dr if mn_smpl_kl>0, fe robust cluster(cid)

{txt}Fixed-effects (within) regression               Number of obs      = {res}      425
{txt}Group variable: {res}cid                             {txt}Number of groups   = {res}       21

{txt}R-sq:  within  = {res}0.6892                         {txt}Obs per group: min = {res}        2
{txt}       between = {res}0.9349                                        {txt}avg = {res}     20.2
{txt}       overall = {res}0.8224                                        {txt}max = {res}       32

                                                {txt}F({res}13{txt},{res}20{txt})           = {res}   374.87
{txt}corr(u_i, Xb)  = {res}0.4715                         {txt}Prob > F           =    {res}0.0000

{txt}{ralign 78:(Std. Err. adjusted for {res:21} clusters in cid)}
{hline 13}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 14}{c |}{col 26}    Robust
{col 1}  cg_bal_gdp{col 14}{c |}      Coef.{col 26}   Std. Err.{col 38}      t{col 46}   P>|t|{col 54}     [95% Con{col 67}f. Interval]
{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 2}cg_bal_gdp {c |}
{space 9}L1. {c |}{col 14}{res}{space 2} .7782893{col 26}{space 2} .0327134{col 37}{space 1}   23.79{col 46}{space 3}0.000{col 54}{space 4} .7100503{col 67}{space 3} .8465282
{txt}{space 12} {c |}
{space 4}ldef_pig {c |}{col 14}{res}{space 2} .0212013{col 26}{space 2} .0234912{col 37}{space 1}    0.90{col 46}{space 3}0.378{col 54}{space 4}-.0278005{col 67}{space 3} .0702032
{txt}{space 9}pig {c |}{col 14}{res}{space 2}-.0391623{col 26}{space 2} .1248536{col 37}{space 1}   -0.31{col 46}{space 3}0.757{col 54}{space 4}-.2996023{col 67}{space 3} .2212778
{txt}{space 3}gdp_grwth {c |}{col 14}{res}{space 2} .3611306{col 26}{space 2}  .077619{col 37}{space 1}    4.65{col 46}{space 3}0.000{col 54}{space 4} .1992203{col 67}{space 3} .5230409
{txt}{space 8}lp_n {c |}{col 14}{res}{space 2}-.5005257{col 26}{space 2} .3162929{col 37}{space 1}   -1.58{col 46}{space 3}0.129{col 54}{space 4}-1.160301{col 67}{space 3} .1592498
{txt}{space 5}ln_infl {c |}{col 14}{res}{space 2}-.1012237{col 26}{space 2} .1438381{col 37}{space 1}   -0.70{col 46}{space 3}0.490{col 54}{space 4}-.4012647{col 67}{space 3} .1988173
{txt}{space 5}r_intrt {c |}{col 14}{res}{space 2}-.0806286{col 26}{space 2}  .105451{col 37}{space 1}   -0.76{col 46}{space 3}0.453{col 54}{space 4}-.3005956{col 67}{space 3} .1393383
{txt}{space 3}unemp_ilo {c |}{col 14}{res}{space 2}-.0406768{col 26}{space 2} .0656671{col 37}{space 1}   -0.62{col 46}{space 3}0.543{col 54}{space 4}-.1776559{col 67}{space 3} .0963023
{txt}{space 1}dist_ex_opp {c |}{col 14}{res}{space 2} .0110479{col 26}{space 2} .1314416{col 37}{space 1}    0.08{col 46}{space 3}0.934{col 54}{space 4}-.2631344{col 67}{space 3} .2852302
{txt}{space 7}right {c |}{col 14}{res}{space 2} .3809491{col 26}{space 2} .3488719{col 37}{space 1}    1.09{col 46}{space 3}0.288{col 54}{space 4} -.346785{col 67}{space 3} 1.108683
{txt}{space 8}left {c |}{col 14}{res}{space 2} .4033931{col 26}{space 2} .5341691{col 37}{space 1}    0.76{col 46}{space 3}0.459{col 54}{space 4}-.7108641{col 67}{space 3}  1.51765
{txt}{space 9}bbr {c |}{col 14}{res}{space 2} .6600869{col 26}{space 2} .4528488{col 37}{space 1}    1.46{col 46}{space 3}0.160{col 54}{space 4} -.284539{col 67}{space 3} 1.604713
{txt}{space 10}dr {c |}{col 14}{res}{space 2}-.3609375{col 26}{space 2} .5088374{col 37}{space 1}   -0.71{col 46}{space 3}0.486{col 54}{space 4}-1.422354{col 67}{space 3} .7004788
{txt}{space 7}_cons {c |}{col 14}{res}{space 2}-1.131586{col 26}{space 2} .8364353{col 37}{space 1}   -1.35{col 46}{space 3}0.191{col 54}{space 4}-2.876359{col 67}{space 3} .6131876
{txt}{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
     sigma_u {c |} {res} .93623383
     {txt}sigma_e {c |} {res} 1.8601557
         {txt}rho {c |} {res} .20211938{txt}   (fraction of variance due to u_i)
{hline 13}{c BT}{hline 64}

{com}. estimates store apd1
{txt}
{com}. 
. *quadratic
. xtreg cg_bal_gdp l.cg_bal_gdp ldef_pig pig gdp_grwth lp_n lp_nsq ln_infl r_intrt unemp_ilo dist_ex_opp right left bbr dr if mn_smpl_kl>0, fe robust cluster(cid)

{txt}Fixed-effects (within) regression               Number of obs      = {res}      425
{txt}Group variable: {res}cid                             {txt}Number of groups   = {res}       21

{txt}R-sq:  within  = {res}0.6907                         {txt}Obs per group: min = {res}        2
{txt}       between = {res}0.9359                                        {txt}avg = {res}     20.2
{txt}       overall = {res}0.8239                                        {txt}max = {res}       32

                                                {txt}F({res}14{txt},{res}20{txt})           = {res}   315.45
{txt}corr(u_i, Xb)  = {res}0.4695                         {txt}Prob > F           =    {res}0.0000

{txt}{ralign 78:(Std. Err. adjusted for {res:21} clusters in cid)}
{hline 13}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 14}{c |}{col 26}    Robust
{col 1}  cg_bal_gdp{col 14}{c |}      Coef.{col 26}   Std. Err.{col 38}      t{col 46}   P>|t|{col 54}     [95% Con{col 67}f. Interval]
{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 2}cg_bal_gdp {c |}
{space 9}L1. {c |}{col 14}{res}{space 2} .7778815{col 26}{space 2} .0327793{col 37}{space 1}   23.73{col 46}{space 3}0.000{col 54}{space 4} .7095051{col 67}{space 3} .8462579
{txt}{space 12} {c |}
{space 4}ldef_pig {c |}{col 14}{res}{space 2} .0217383{col 26}{space 2} .0230077{col 37}{space 1}    0.94{col 46}{space 3}0.356{col 54}{space 4}-.0262549{col 67}{space 3} .0697316
{txt}{space 9}pig {c |}{col 14}{res}{space 2} -.033313{col 26}{space 2} .1265426{col 37}{space 1}   -0.26{col 46}{space 3}0.795{col 54}{space 4}-.2972762{col 67}{space 3} .2306503
{txt}{space 3}gdp_grwth {c |}{col 14}{res}{space 2} .3601795{col 26}{space 2} .0774145{col 37}{space 1}    4.65{col 46}{space 3}0.000{col 54}{space 4} .1986956{col 67}{space 3} .5216633
{txt}{space 8}lp_n {c |}{col 14}{res}{space 2}-2.620013{col 26}{space 2} 1.282265{col 37}{space 1}   -2.04{col 46}{space 3}0.054{col 54}{space 4}-5.294772{col 67}{space 3} .0547457
{txt}{space 6}lp_nsq {c |}{col 14}{res}{space 2} 3.114265{col 26}{space 2} 1.722339{col 37}{space 1}    1.81{col 46}{space 3}0.086{col 54}{space 4}-.4784714{col 67}{space 3} 6.707001
{txt}{space 5}ln_infl {c |}{col 14}{res}{space 2}-.0916835{col 26}{space 2} .1490719{col 37}{space 1}   -0.62{col 46}{space 3}0.545{col 54}{space 4}-.4026421{col 67}{space 3} .2192751
{txt}{space 5}r_intrt {c |}{col 14}{res}{space 2}-.0796385{col 26}{space 2} .1066318{col 37}{space 1}   -0.75{col 46}{space 3}0.464{col 54}{space 4}-.3020685{col 67}{space 3} .1427916
{txt}{space 3}unemp_ilo {c |}{col 14}{res}{space 2}-.0446175{col 26}{space 2} .0651388{col 37}{space 1}   -0.68{col 46}{space 3}0.501{col 54}{space 4}-.1804946{col 67}{space 3} .0912596
{txt}{space 1}dist_ex_opp {c |}{col 14}{res}{space 2} .0108241{col 26}{space 2} .1282193{col 37}{space 1}    0.08{col 46}{space 3}0.934{col 54}{space 4}-.2566367{col 67}{space 3} .2782849
{txt}{space 7}right {c |}{col 14}{res}{space 2} .4414381{col 26}{space 2} .3465966{col 37}{space 1}    1.27{col 46}{space 3}0.217{col 54}{space 4}-.2815496{col 67}{space 3} 1.164426
{txt}{space 8}left {c |}{col 14}{res}{space 2} .4553236{col 26}{space 2} .5209787{col 37}{space 1}    0.87{col 46}{space 3}0.393{col 54}{space 4} -.631419{col 67}{space 3} 1.542066
{txt}{space 9}bbr {c |}{col 14}{res}{space 2} .6516722{col 26}{space 2} .4552958{col 37}{space 1}    1.43{col 46}{space 3}0.168{col 54}{space 4}-.2980581{col 67}{space 3} 1.601403
{txt}{space 10}dr {c |}{col 14}{res}{space 2}-.3144527{col 26}{space 2} .5097331{col 37}{space 1}   -0.62{col 46}{space 3}0.544{col 54}{space 4}-1.377737{col 67}{space 3} .7488319
{txt}{space 7}_cons {c |}{col 14}{res}{space 2}-1.165596{col 26}{space 2} .8408449{col 37}{space 1}   -1.39{col 46}{space 3}0.181{col 54}{space 4}-2.919567{col 67}{space 3}  .588376
{txt}{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
     sigma_u {c |} {res} .92584151
     {txt}sigma_e {c |} {res} 1.8579999
         {txt}rho {c |} {res} .19891243{txt}   (fraction of variance due to u_i)
{hline 13}{c BT}{hline 64}

{com}. estimates store apd2
{txt}
{com}. 
. *2. Aggregate KL (b) with limited sample
. 
. *linear
. xtreg cg_bal_gdp l.cg_bal_gdp ldef_pig pig gdp_grwth lp2_n ln_infl r_intrt unemp_ilo dist_ex_opp right left bbr dr if mn_smpl_kl>0, fe robust cluster(cid)

{txt}Fixed-effects (within) regression               Number of obs      = {res}      425
{txt}Group variable: {res}cid                             {txt}Number of groups   = {res}       21

{txt}R-sq:  within  = {res}0.6913                         {txt}Obs per group: min = {res}        2
{txt}       between = {res}0.9324                                        {txt}avg = {res}     20.2
{txt}       overall = {res}0.8223                                        {txt}max = {res}       32

                                                {txt}F({res}13{txt},{res}20{txt})           = {res}   390.32
{txt}corr(u_i, Xb)  = {res}0.4707                         {txt}Prob > F           =    {res}0.0000

{txt}{ralign 78:(Std. Err. adjusted for {res:21} clusters in cid)}
{hline 13}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 14}{c |}{col 26}    Robust
{col 1}  cg_bal_gdp{col 14}{c |}      Coef.{col 26}   Std. Err.{col 38}      t{col 46}   P>|t|{col 54}     [95% Con{col 67}f. Interval]
{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 2}cg_bal_gdp {c |}
{space 9}L1. {c |}{col 14}{res}{space 2} .7744802{col 26}{space 2} .0323482{col 37}{space 1}   23.94{col 46}{space 3}0.000{col 54}{space 4}  .707003{col 67}{space 3} .8419574
{txt}{space 12} {c |}
{space 4}ldef_pig {c |}{col 14}{res}{space 2} .0214367{col 26}{space 2} .0235762{col 37}{space 1}    0.91{col 46}{space 3}0.374{col 54}{space 4}-.0277424{col 67}{space 3} .0706159
{txt}{space 9}pig {c |}{col 14}{res}{space 2}-.0400575{col 26}{space 2} .1282811{col 37}{space 1}   -0.31{col 46}{space 3}0.758{col 54}{space 4}-.3076472{col 67}{space 3} .2275322
{txt}{space 3}gdp_grwth {c |}{col 14}{res}{space 2}  .361291{col 26}{space 2} .0773106{col 37}{space 1}    4.67{col 46}{space 3}0.000{col 54}{space 4} .2000238{col 67}{space 3} .5225581
{txt}{space 7}lp2_n {c |}{col 14}{res}{space 2}-.7631231{col 26}{space 2} .2754222{col 37}{space 1}   -2.77{col 46}{space 3}0.012{col 54}{space 4}-1.337644{col 67}{space 3}-.1886024
{txt}{space 5}ln_infl {c |}{col 14}{res}{space 2}-.0874663{col 26}{space 2} .1393597{col 37}{space 1}   -0.63{col 46}{space 3}0.537{col 54}{space 4}-.3781655{col 67}{space 3}  .203233
{txt}{space 5}r_intrt {c |}{col 14}{res}{space 2} -.079647{col 26}{space 2}  .107515{col 37}{space 1}   -0.74{col 46}{space 3}0.467{col 54}{space 4}-.3039195{col 67}{space 3} .1446254
{txt}{space 3}unemp_ilo {c |}{col 14}{res}{space 2}-.0398187{col 26}{space 2} .0667351{col 37}{space 1}   -0.60{col 46}{space 3}0.557{col 54}{space 4}-.1790257{col 67}{space 3} .0993884
{txt}{space 1}dist_ex_opp {c |}{col 14}{res}{space 2} .0256656{col 26}{space 2} .1263292{col 37}{space 1}    0.20{col 46}{space 3}0.841{col 54}{space 4}-.2378526{col 67}{space 3} .2891837
{txt}{space 7}right {c |}{col 14}{res}{space 2} .4514877{col 26}{space 2} .3356596{col 37}{space 1}    1.35{col 46}{space 3}0.194{col 54}{space 4} -.248686{col 67}{space 3} 1.151661
{txt}{space 8}left {c |}{col 14}{res}{space 2} .4167175{col 26}{space 2} .5134257{col 37}{space 1}    0.81{col 46}{space 3}0.427{col 54}{space 4}-.6542697{col 67}{space 3} 1.487705
{txt}{space 9}bbr {c |}{col 14}{res}{space 2} .6355469{col 26}{space 2} .4598995{col 37}{space 1}    1.38{col 46}{space 3}0.182{col 54}{space 4}-.3237867{col 67}{space 3}  1.59488
{txt}{space 10}dr {c |}{col 14}{res}{space 2}-.3457231{col 26}{space 2} .5075816{col 37}{space 1}   -0.68{col 46}{space 3}0.504{col 54}{space 4} -1.40452{col 67}{space 3} .7130735
{txt}{space 7}_cons {c |}{col 14}{res}{space 2}-1.150856{col 26}{space 2} .8307948{col 37}{space 1}   -1.39{col 46}{space 3}0.181{col 54}{space 4}-2.883863{col 67}{space 3} .5821519
{txt}{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
     sigma_u {c |} {res} .95417823
     {txt}sigma_e {c |} {res} 1.8537154
         {txt}rho {c |} {res} .20945834{txt}   (fraction of variance due to u_i)
{hline 13}{c BT}{hline 64}

{com}. estimates store apd3
{txt}
{com}. 
. *quadratic
. xtreg cg_bal_gdp l.cg_bal_gdp ldef_pig pig gdp_grwth lp2_n lp2_nsq ln_infl r_intrt unemp_ilo dist_ex_opp right left bbr dr if mn_smpl_kl>0, fe robust cluster(cid)

{txt}Fixed-effects (within) regression               Number of obs      = {res}      425
{txt}Group variable: {res}cid                             {txt}Number of groups   = {res}       21

{txt}R-sq:  within  = {res}0.6913                         {txt}Obs per group: min = {res}        2
{txt}       between = {res}0.9321                                        {txt}avg = {res}     20.2
{txt}       overall = {res}0.8222                                        {txt}max = {res}       32

                                                {txt}F({res}14{txt},{res}20{txt})           = {res}   482.62
{txt}corr(u_i, Xb)  = {res}0.4706                         {txt}Prob > F           =    {res}0.0000

{txt}{ralign 78:(Std. Err. adjusted for {res:21} clusters in cid)}
{hline 13}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 14}{c |}{col 26}    Robust
{col 1}  cg_bal_gdp{col 14}{c |}      Coef.{col 26}   Std. Err.{col 38}      t{col 46}   P>|t|{col 54}     [95% Con{col 67}f. Interval]
{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 2}cg_bal_gdp {c |}
{space 9}L1. {c |}{col 14}{res}{space 2} .7742466{col 26}{space 2} .0328998{col 37}{space 1}   23.53{col 46}{space 3}0.000{col 54}{space 4} .7056188{col 67}{space 3} .8428744
{txt}{space 12} {c |}
{space 4}ldef_pig {c |}{col 14}{res}{space 2} .0213931{col 26}{space 2} .0235364{col 37}{space 1}    0.91{col 46}{space 3}0.374{col 54}{space 4}-.0277029{col 67}{space 3} .0704891
{txt}{space 9}pig {c |}{col 14}{res}{space 2}-.0397129{col 26}{space 2} .1293667{col 37}{space 1}   -0.31{col 46}{space 3}0.762{col 54}{space 4}-.3095672{col 67}{space 3} .2301413
{txt}{space 3}gdp_grwth {c |}{col 14}{res}{space 2} .3612869{col 26}{space 2} .0773787{col 37}{space 1}    4.67{col 46}{space 3}0.000{col 54}{space 4} .1998777{col 67}{space 3} .5226961
{txt}{space 7}lp2_n {c |}{col 14}{res}{space 2}-.6502319{col 26}{space 2}  1.08135{col 37}{space 1}   -0.60{col 46}{space 3}0.554{col 54}{space 4}-2.905888{col 67}{space 3} 1.605424
{txt}{space 5}lp2_nsq {c |}{col 14}{res}{space 2}-.1540049{col 26}{space 2} 1.435689{col 37}{space 1}   -0.11{col 46}{space 3}0.916{col 54}{space 4}-3.148799{col 67}{space 3}  2.84079
{txt}{space 5}ln_infl {c |}{col 14}{res}{space 2}-.0869342{col 26}{space 2} .1399483{col 37}{space 1}   -0.62{col 46}{space 3}0.541{col 54}{space 4}-.3788612{col 67}{space 3} .2049929
{txt}{space 5}r_intrt {c |}{col 14}{res}{space 2}-.0797211{col 26}{space 2} .1076397{col 37}{space 1}   -0.74{col 46}{space 3}0.468{col 54}{space 4}-.3042536{col 67}{space 3} .1448114
{txt}{space 3}unemp_ilo {c |}{col 14}{res}{space 2}-.0396512{col 26}{space 2}  .066818{col 37}{space 1}   -0.59{col 46}{space 3}0.560{col 54}{space 4}-.1790312{col 67}{space 3} .0997288
{txt}{space 1}dist_ex_opp {c |}{col 14}{res}{space 2} .0262351{col 26}{space 2} .1251442{col 37}{space 1}    0.21{col 46}{space 3}0.836{col 54}{space 4}-.2348113{col 67}{space 3} .2872814
{txt}{space 7}right {c |}{col 14}{res}{space 2} .4505497{col 26}{space 2} .3376692{col 37}{space 1}    1.33{col 46}{space 3}0.197{col 54}{space 4} -.253816{col 67}{space 3} 1.154915
{txt}{space 8}left {c |}{col 14}{res}{space 2} .4142179{col 26}{space 2} .5098203{col 37}{space 1}    0.81{col 46}{space 3}0.426{col 54}{space 4}-.6492486{col 67}{space 3} 1.477684
{txt}{space 9}bbr {c |}{col 14}{res}{space 2} .6355266{col 26}{space 2} .4603468{col 37}{space 1}    1.38{col 46}{space 3}0.183{col 54}{space 4}  -.32474{col 67}{space 3} 1.595793
{txt}{space 10}dr {c |}{col 14}{res}{space 2}-.3451766{col 26}{space 2} .5092952{col 37}{space 1}   -0.68{col 46}{space 3}0.506{col 54}{space 4}-1.407548{col 67}{space 3} .7171947
{txt}{space 7}_cons {c |}{col 14}{res}{space 2}-1.153421{col 26}{space 2} .8330766{col 37}{space 1}   -1.38{col 46}{space 3}0.181{col 54}{space 4}-2.891188{col 67}{space 3} .5843463
{txt}{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
     sigma_u {c |} {res} .95601034
     {txt}sigma_e {c |} {res} 1.8560736
         {txt}rho {c |} {res} .20967266{txt}   (fraction of variance due to u_i)
{hline 13}{c BT}{hline 64}

{com}. estimates store apd4
{txt}
{com}. 
. estout apd1 apd2 apd3 apd4 using "appendix_a.tex", cells(b(star fmt(%9.2f)) se(par)) stats(r2_a N, fmt(%9.3f %9.0g) labels(R-squared)) legend label collabels(none) varlabels(_cons Constant) replace
{res}{txt}(output written to {browse  `"appendix_a.tex"'})

{com}. 
. ***Appendix B - Summary Statistics
. sutex cg_bal_gdp pig gdp_grwth polar elec ln_infl r_intrt unemp_ilo dist_ex_opp right left lpr lp_n lp2_n dr bbr if rwd==1, par min dig(2) lab  file(summary.tex) replace
file {view "summary.tex"} saved
{txt}
{com}. 
. *end*
. log cl
      {txt}name:  {res}<unnamed>
       {txt}log:  {res}C:\work\new\UCL\research\ph\phfd_psrm.smcl
  {txt}log type:  {res}smcl
 {txt}closed on:  {res}15 Nov 2018, 20:25:08
{txt}{.-}
{smcl}
{txt}{sf}{ul off}